<?php

namespace app\proxy\controller\supplier;

use app\proxy\controller\Controller;
use app\proxy\model\proxy\Region as RegionModel;

class Region extends Controller
{

    public function getTreeList($disabled)
    {
        $regions = RegionModel::regionListOptions($this->getProxyId(), (bool)$disabled);

        return $this->renderSuccess('', compact('regions'));
    }

    public function getCityList()
    {
        $regions = RegionModel::cityListOptions($this->getProxyId());
        return $this->renderSuccess('', compact('regions'));
    }
}